package com.twu.biblioteca;

import java.io.PrintStream;
import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: Thoughtworker
 * Date: 8/22/13
 * Time: 10:31 AM
 * To change this template use File | Settings | File Templates.
 */


public class Output {
    PrintStream printStream;
    public Output(PrintStream printStream)
    {
        this.printStream = printStream;
    }

    public void printPleaseTalkToLibrarianMessage() {
        printStream.println("Please talk to a librarian. Thank You.");
    }

    public void printBookNotAvailableMessage() {
        printStream.println("Sorry we don't have that book yet.");
    }

    public void printThankYouMessage() {
        printStream.println("Thank You! Enjoy the book.");
    }
    public void welcome() {
        printStream.println("Welcome!");
    }
    public void printBookToReserveMessage() {
        printStream.println("Enter number of book to reserve:");
    }

    public void printValidOptionPrompt() {
        printStream.println("Select a valid option!!");
    }

    public void printMenuOptions(ArrayList<String> options){
        for(int i =0; i< options.size(); i++){
            printStream.println("[" + (i) + "] " + options.get(i) + ";");
        }
    }

    public void printBooks(ArrayList<Book> books) {
        for(Book book: books){
            printStream.println(book.getName());
        }
    }


    public void printMovies(ArrayList<Movie> movies) {
        printStream.println("Title\tYear\tDirector\tRating");

        for(Movie m: movies)
        {
            printStream.println(m.toString());
        }
        //To change body of created methods use File | Settings | File Templates.
    }
}
